//
//  main.cpp
//  all_test03
//
//  Created by Jarosław Wojtasik on 17.06.2013.
//  Copyright (c) 2013 Jarosław Wojtasik. All rights reserved.
//

#include <allegro5/allegro.h>

int main(int argc, char **argv)
{
    al_init();
    
    ALLEGRO_BITMAP* bmp;
    int w=640;
    int h= 480;
    float c = 1;
    
    al_create_display(w, h);
    al_clear_to_color(al_map_rgb_f(c, c, c));

    bmp = al_clone_bitmap(al_get_backbuffer(al_get_current_display()));
    
    al_draw_tinted_bitmap(bmp, al_map_rgb_f(c*.85, c*.85, c*.85), 0, 0, 0);
    al_draw_tinted_bitmap_region(bmp, al_map_rgb(0, 0, 0), 0, 0, w/5, h/5, w/2-w/10 , h/2-h/10, 0);
    al_draw_tinted_bitmap_region(bmp, al_map_rgb_f(c, c, c), 0, 0, w/5-1, h/5-1, w/2-w/10 , h/2-h/10, 0);
    
    al_draw_tinted_bitmap_region(bmp, al_map_rgb_f(c*.92, c*.92, c*.92), 0, 0, w/160, (h/5-1)/4, w/2-w/320 , h/2-h*.1, 0);
    al_draw_tinted_bitmap_region(bmp, al_map_rgb_f(c*.92, c*.92, c*.92), 0, 0, w/160, (h/5-1)/4, w/2-w/320 , h/2-h*.025, 0);
    al_draw_tinted_bitmap_region(bmp, al_map_rgb_f(c*.92, c*.92, c*.92), 0, 0, w/160, (h/5-1)/4, w/2-w/320 , h/2+h*.05, 0);
    
    al_flip_display();
    al_rest(10.0);
    
    return 0;
}
		
